<template>
  <div class="about">
  <h3>我是在父子组件</h3>
    <div id="menu">
         <button type="button" @click="setpat()">{{pattern}}</button>  
         <button type="button" @click="setShowHidden()">{{hidden}}</button>
         <button type="button" @click="setShowAppear()">{{Appear}}</button> 
         <button @click="huhu()">子组件调用父组件方法</button>
         <button @click="test()">测试</button>
    </div>
    
    <div class="conten" v-for="(item,index) in msg" :key="index">
        {{index}}--{{item.name+item.yuyu+item.aa}}<button @click="compose()">编辑</button>
    </div>
    
  </div>
</template>
<script>
import VueEvent from '../../VueEvent.js'
  export default{
    data () {
      return {
        msg:this.polyes,
        ff:'我是about'
      }
    },
    props:['hidden','pattern','Appear','polyes','home','map'],


    mounted() {
      

        },


    methods: {
      setShowHidden() {
        this.$parent.setShowHidden();
      },
      setShowAppear() {
        this.$parent.appear();
      },
     
      huhu() {
        this.$emit('showcity');
      },
     
     setpat(){
        
     },
     tt(){
       alert(676767);
     },
     test() {
      
       VueEvent.$emit('rr',this.tt)
     },
      compose() {
       var hh= this.map.getLayer('point1');
          //  hh.enableEditing();
        //  hh.enableEditing();
        console.log(hh,'hh')
        // this.map.getLayer('point1').enableEditing();
       
        
      }
    },
  }
</script>
<style lang="scss">
   #menu {
              position: relative;
              top: 10px;
              z-index: 99;
            }
  .about{
    width:30%;
    position:absolute;
    height:400px;
    background-color:green;
    margin-left: 900px;
    margin-top: -400px;
    // float:right;
  }
  .conten{
     position: relative;
     top:30px;
     left:10px;
    //  background-color:red;
  }
</style>